package scauCmiScaffolding.compiled;

import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Template;
import org.eclipse.jet.JET2Writer;
import org.eclipse.jet.taglib.RuntimeTagElement;
import org.eclipse.jet.taglib.TagInfo;

public class _jet_findEntityByPrimaryKeyColumns_0 implements JET2Template {
    private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
    private static final String _jetns_java = "org.eclipse.jet.javaTags"; //$NON-NLS-1$

    public _jet_findEntityByPrimaryKeyColumns_0() {
        super();
    }

    private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
    
    private static final TagInfo _td_java_format_1_1 = new TagInfo("java:format", //$NON-NLS-1$
            1, 1,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_iterate_2_2 = new TagInfo("c:iterate", //$NON-NLS-1$
            2, 2,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$eachTable/primaryKeys/column", //$NON-NLS-1$
                "primaryKey", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_12 = new TagInfo("c:get", //$NON-NLS-1$
            4, 12,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_67 = new TagInfo("c:get", //$NON-NLS-1$
            4, 67,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_119 = new TagInfo("c:get", //$NON-NLS-1$
            4, 119,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_172 = new TagInfo("c:get", //$NON-NLS-1$
            4, 172,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "($primaryKey/@javaType)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_214 = new TagInfo("c:get", //$NON-NLS-1$
            4, 214,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_6_17 = new TagInfo("c:get", //$NON-NLS-1$
            6, 17,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_6_69 = new TagInfo("c:get", //$NON-NLS-1$
            6, 69,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_6_122 = new TagInfo("c:get", //$NON-NLS-1$
            6, 122,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_10_12 = new TagInfo("c:get", //$NON-NLS-1$
            10, 12,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_10_67 = new TagInfo("c:get", //$NON-NLS-1$
            10, 67,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_10_119 = new TagInfo("c:get", //$NON-NLS-1$
            10, 119,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_10_172 = new TagInfo("c:get", //$NON-NLS-1$
            10, 172,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "($primaryKey/@javaType)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_10_214 = new TagInfo("c:get", //$NON-NLS-1$
            10, 214,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_java_import_12_7 = new TagInfo("java:import", //$NON-NLS-1$
            12, 7,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_get_12_88 = new TagInfo("c:get", //$NON-NLS-1$
            12, 88,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_12_140 = new TagInfo("c:get", //$NON-NLS-1$
            12, 140,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_12_217 = new TagInfo("c:get", //$NON-NLS-1$
            12, 217,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_13_15 = new TagInfo("c:get", //$NON-NLS-1$
            13, 15,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "$packageName", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_13_53 = new TagInfo("c:get", //$NON-NLS-1$
            13, 53,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_java_import_14_15 = new TagInfo("java:import", //$NON-NLS-1$
            14, 15,
            new String[] {
            },
            new String[] {
            } );

    public void generate(final JET2Context context, final JET2Writer __out) {
        JET2Writer out = __out;
        RuntimeTagElement _jettag_java_format_1_1 = context.getTagFactory().createRuntimeTag(_jetns_java, "format", "java:format", _td_java_format_1_1); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_java_format_1_1.setRuntimeParent(null);
        _jettag_java_format_1_1.setTagInfo(_td_java_format_1_1);
        _jettag_java_format_1_1.doStart(context, out);
        JET2Writer _jettag_java_format_1_1_saved_out = out;
        while (_jettag_java_format_1_1.okToProcessBody()) {
            out = out.newNestedContentWriter();
            out.write(NL);         
            RuntimeTagElement _jettag_c_iterate_2_2 = context.getTagFactory().createRuntimeTag(_jetns_c, "iterate", "c:iterate", _td_c_iterate_2_2); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_iterate_2_2.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_iterate_2_2.setTagInfo(_td_c_iterate_2_2);
            _jettag_c_iterate_2_2.doStart(context, out);
            while (_jettag_c_iterate_2_2.okToProcessBody()) {
                out.write("\t\t\t\t@Transactional");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\tpublic ");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_4_12 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_12); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_4_12.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_4_12.setTagInfo(_td_c_get_4_12);
                _jettag_c_get_4_12.doStart(context, out);
                _jettag_c_get_4_12.doEnd();
                out.write(" find");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_4_67 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_67); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_4_67.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_4_67.setTagInfo(_td_c_get_4_67);
                _jettag_c_get_4_67.doStart(context, out);
                _jettag_c_get_4_67.doEnd();
                out.write("By");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_4_119 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_119); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_4_119.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_4_119.setTagInfo(_td_c_get_4_119);
                _jettag_c_get_4_119.doStart(context, out);
                _jettag_c_get_4_119.doEnd();
                out.write("(");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_4_172 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_172); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_4_172.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_4_172.setTagInfo(_td_c_get_4_172);
                _jettag_c_get_4_172.doStart(context, out);
                _jettag_c_get_4_172.doEnd();
                out.write(" ");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_4_214 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_214); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_4_214.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_4_214.setTagInfo(_td_c_get_4_214);
                _jettag_c_get_4_214.doStart(context, out);
                _jettag_c_get_4_214.doEnd();
                out.write(") throws DataAccessException {");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t\treturn find");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_6_17 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_17); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_6_17.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_6_17.setTagInfo(_td_c_get_6_17);
                _jettag_c_get_6_17.doStart(context, out);
                _jettag_c_get_6_17.doEnd();
                out.write("By");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_6_69 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_69); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_6_69.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_6_69.setTagInfo(_td_c_get_6_69);
                _jettag_c_get_6_69.doStart(context, out);
                _jettag_c_get_6_69.doEnd();
                out.write("(");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_6_122 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_122); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_6_122.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_6_122.setTagInfo(_td_c_get_6_122);
                _jettag_c_get_6_122.doStart(context, out);
                _jettag_c_get_6_122.doEnd();
                out.write(", -1, -1);");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t}");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t@Transactional");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\tpublic ");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_10_12 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_10_12); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_10_12.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_10_12.setTagInfo(_td_c_get_10_12);
                _jettag_c_get_10_12.doStart(context, out);
                _jettag_c_get_10_12.doEnd();
                out.write(" find");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_10_67 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_10_67); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_10_67.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_10_67.setTagInfo(_td_c_get_10_67);
                _jettag_c_get_10_67.doStart(context, out);
                _jettag_c_get_10_67.doEnd();
                out.write("By");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_10_119 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_10_119); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_10_119.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_10_119.setTagInfo(_td_c_get_10_119);
                _jettag_c_get_10_119.doStart(context, out);
                _jettag_c_get_10_119.doEnd();
                out.write("(");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_10_172 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_10_172); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_10_172.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_10_172.setTagInfo(_td_c_get_10_172);
                _jettag_c_get_10_172.doStart(context, out);
                _jettag_c_get_10_172.doEnd();
                out.write(" ");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_10_214 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_10_214); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_10_214.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_10_214.setTagInfo(_td_c_get_10_214);
                _jettag_c_get_10_214.doStart(context, out);
                _jettag_c_get_10_214.doEnd();
                out.write(", int startResult, int maxRows) throws DataAccessException {");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t\ttry {");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t\t\t");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_java_import_12_7 = context.getTagFactory().createRuntimeTag(_jetns_java, "import", "java:import", _td_java_import_12_7); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_java_import_12_7.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_java_import_12_7.setTagInfo(_td_java_import_12_7);
                _jettag_java_import_12_7.doStart(context, out);
                JET2Writer _jettag_java_import_12_7_saved_out = out;
                while (_jettag_java_import_12_7.okToProcessBody()) {
                    out = out.newNestedContentWriter();
                    out.write("javax.persistence.Query");  //$NON-NLS-1$        
                    _jettag_java_import_12_7.handleBodyContent(out);
                }
                out = _jettag_java_import_12_7_saved_out;
                _jettag_java_import_12_7.doEnd();
                out.write(" query = createNamedQuery(\"find");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_12_88 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_12_88); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_12_88.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_12_88.setTagInfo(_td_c_get_12_88);
                _jettag_c_get_12_88.doStart(context, out);
                _jettag_c_get_12_88.doEnd();
                out.write("By");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_12_140 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_12_140); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_12_140.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_12_140.setTagInfo(_td_c_get_12_140);
                _jettag_c_get_12_140.doStart(context, out);
                _jettag_c_get_12_140.doEnd();
                out.write("\", startResult, maxRows, ");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_12_217 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_12_217); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_12_217.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_12_217.setTagInfo(_td_c_get_12_217);
                _jettag_c_get_12_217.doStart(context, out);
                _jettag_c_get_12_217.doEnd();
                out.write(");");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t\t\treturn (");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_13_15 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_13_15); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_13_15.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_13_15.setTagInfo(_td_c_get_13_15);
                _jettag_c_get_13_15.doStart(context, out);
                _jettag_c_get_13_15.doEnd();
                out.write(".domain.");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_13_53 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_13_53); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_13_53.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_c_get_13_53.setTagInfo(_td_c_get_13_53);
                _jettag_c_get_13_53.doStart(context, out);
                _jettag_c_get_13_53.doEnd();
                out.write(") query.getSingleResult();");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t\t} catch (");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_java_import_14_15 = context.getTagFactory().createRuntimeTag(_jetns_java, "import", "java:import", _td_java_import_14_15); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_java_import_14_15.setRuntimeParent(_jettag_c_iterate_2_2);
                _jettag_java_import_14_15.setTagInfo(_td_java_import_14_15);
                _jettag_java_import_14_15.doStart(context, out);
                JET2Writer _jettag_java_import_14_15_saved_out = out;
                while (_jettag_java_import_14_15.okToProcessBody()) {
                    out = out.newNestedContentWriter();
                    out.write("javax.persistence.NoResultException");  //$NON-NLS-1$        
                    _jettag_java_import_14_15.handleBodyContent(out);
                }
                out = _jettag_java_import_14_15_saved_out;
                _jettag_java_import_14_15.doEnd();
                out.write(" nre) {");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t\t\treturn null;");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t\t}");  //$NON-NLS-1$        
                out.write(NL);         
                out.write("\t\t\t\t}\t\t\t");  //$NON-NLS-1$        
                out.write(NL);         
                _jettag_c_iterate_2_2.handleBodyContent(out);
            }
            _jettag_c_iterate_2_2.doEnd();
            _jettag_java_format_1_1.handleBodyContent(out);
        }
        out = _jettag_java_format_1_1_saved_out;
        _jettag_java_format_1_1.doEnd();
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
        out.write(NL);         
    }
}
